import axios from 'axios'

export function request(config) {
  ///1.创建axios的实例
  const instance = axios.create({
    baseURL: 'http://xxx.xxx.xxx.xxx',
    timeout: 6000
  });
  //2.axios响应拦截
  instance.interceptors.response.use(res => {
    return res.data
  }, err => {
    console.log(err)
  });
  //发送真正的网络请求
  return instance(config)
}
//https://www.kancloud.cn/yunye/axios/234845 ；axios中文说明
/*http://123.207.32.32*/
/*http://106.54.54.237*/
